using Prism.Mvvm;
using RFS.Domain.PaiShi;
using RFS.Domain.PaiShi.Accounting;

namespace RFS.WPF.Views
{
    public class YsDanSelectionOptionVm : BindableBase
    {
        private bool _selected;

        private readonly IOrderItem _orderItem;
        public IOrderItem OrderItem{get=> _orderItem;  } 

        public YsDanSelectionOptionVm(IOrderItem orderItem)
        {
            _orderItem = orderItem;
            Amountc=new Amount( amount:  orderItem.Amount, quantity: orderItem.Quantity);
            Product = $"{orderItem.Product}";
            Date = $"{orderItem.BizTime:MM-dd}";
            
        }

        #region Date

        private string _date;

        public string Date
        {
            get { return _date; }
            set
            {
                _date = value;
                RaisePropertyChanged(nameof(Date));
            }
        }

        #endregion
        
        #region Selected


        public bool Selected
        {
            get { return _selected; }
            set
            {
                _selected = value;
                RaisePropertyChanged(nameof(Selected));
            }
        }

        #endregion

        #region AmountCash

        private Amount _amountc;

        public Amount Amountc
        {
            get { return _amountc; }
            set
            {
                _amountc = value;
                RaisePropertyChanged(nameof(Amountc));
            }
        }

        #endregion

        #region Product

        private string _product;

        public string Product
        {
            get { return _product; }
            set
            {
                _product = value;
                RaisePropertyChanged(nameof(Product));
            }
        }

        #endregion
    }
}